let defaultState = {
    list: [
        // {
        //     value: '你好啊'
        // }
    ]
}
export default (state = defaultState, action) => {
    if(action.type === 'addList') {
        let newState = JSON.parse(JSON.stringify(state))
        newState.list.push(action.value);
        return newState;
    }
    //redux-thunk的使用
    if(action.type === 'addListdefault') {
        let newState = JSON.parse(JSON.stringify(state))
        newState.list = action.value;
        return newState;
    }
     //redux-saga的使用
     if(action.type === 'addListdefault-saga') {
        let newState = JSON.parse(JSON.stringify(state))
        debugger
        newState.list = action.value;
        return newState;
    }
     //redux-saga的使用
     if(action.type === 'clearListdefault-saga') {
        let newState = JSON.parse(JSON.stringify(state))
        newState.list = [];
        return newState;
    }
   return state
}